<script type="text/javascript">
//<![CDATA[
	$(function(){
		$("[name=layer_dong]").keydown(function(e){
			if(e.which == 13){ //Enter Key
				findpost("obj1=<?php echo $obj1?>&obj2=<?php echo $obj2?>&obj3=<?php echo $obj3?>");
			}
			return;
		});
	});
//]]>
</script>
<form name="frmZipcode">
	<input type="hidden" name="obj1" value="<?php echo $obj1?>" />
	<input type="hidden" name="obj2" value="<?php echo $obj2?>" />
	<input type="hidden" name="obj3" value="<?php echo $obj3?>" />
</form>
<div class="box_type02">
	<p class="layTit"><img src="/theme/<?=$_theme?>/images/common/ly_tit_add.gif" alt="우편번호 찾기" /></p>
	<p class="icon"><a href="javascript:closeLy();" class="icon_m05">닫기</a></p>

	<div class="addSch">
		<input type="text" id="" name="layer_dong" class="ip_i" style="width:253px;" value=""  />
		<a href="javascript:findpost('add');"><img src="/theme/<?=$_theme?>/images/common/btn_add.gif" class="vam" alt="우편번호찾기" /></a>

		<p>- 검색을 원하시는 지역의 동, 읍, 면 등을 입력하세요.</p>
	</div>

	<!--[s] 목록 -->
	<table cellspacing="0" summary="우편번호" class="lines">
		<caption>우편번호</caption>
		<thead>
		<tr>
			<th scope="col" width="126">우편번호</th>
			<th scope="col">주소</th>
		</tr>
		</thead>
	</table>
	<div class="addScroll">
		<table cellspacing="0" summary="우편번호" class="lines">
			<caption>우편번호</caption>
			<tbody>
			<?php 
				if(is_array($rst)){
					foreach($rst as $row){
						$post = $row->zipcode;
						$addr = "{$row->sido} {$row->gugun} {$row->dong}";
						$view_addr = "{$row->sido} {$row->gugun} {$row->dong} {$row->ri} {$row->bldg} {$row->bunji}";
			?>
			<tr>
				<th width="126"><p><?php echo $post?></p></th>
				<td class="tal"><div><a href="javascript:setAddr('<?php echo $post?>','<?php echo $addr?>');"><?php echo $view_addr?></a></div></td>
			</tr>
			<?php
					} 
				}else{
			?>
			<tr>
				<th colspan="2" height="296"><p>검색을 원하시는 지역의 동, 읍, 면 등을 입력하세요.</p></th>
			</tr>
			<?php 
				}
			?>
			
			</tbody>
		</table>
	</div>
	<!--[e] 목록 -->
</div>
